package com.ktgj.flight.common.qunar;

import com.ktgj.flight.common.qunar.domain.QnnarFlightSearchPriceResponse;
import com.ktgj.flight.domain.InterfaceEntity.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class QunarServiceImpl implements QunarService {
    @Autowired
    private _Qunar qunar;

    //报价搜索
    @Override
    public QnnarFlightSearchPriceResponse flightSearchPrice(String OrgAirport, String DstAirport, String DepDate, String FlightNo, String BackDate) {
        QnnarFlightSearchPriceResponse response = qunar._FlightSearchPrice(OrgAirport, DstAirport, DepDate, FlightNo, BackDate);
        return response;
    }

    //仓位验价
    @Override
    public MoFlightCheckResponse flightCheck(MoFlightCheckRequest request) {
        MoFlightCheckResponse response = qunar._FlightCheck(request);
        return response;
    }

    //创建订单
    @Override
    public MoCreateOrderResponse orderCreate(MoCreateOrderRequest request) {
        MoCreateOrderResponse response = qunar._OrderCreate(request);
        return response;
    }

    //查询订单详情
    @Override
    public MoQueryOrderResponse queryOrderInfo(MoQueryOrderRequest request) {
        MoQueryOrderResponse response = qunar._QueryOrderInfo(request);
        return response;
    }

    //订单支付前校验
    @Override
    public MoOrderCheckResponse orderCheck(MoOrderCheckRequest request) {
        MoOrderCheckResponse response = qunar._OrderCheck(request);
        return response;
    }

    //支付订单
    @Override
    public MoOrderPayResponse orderPay(MoOrderPayRequest request) {
        MoOrderPayResponse response = qunar._OrderPay(request);
        return response;
    }

    //申请退票
    @Override
    public MoOrderRefundResponse orderRefund(MoOrderRefundRequest request) {
        MoOrderRefundResponse response = qunar._OrderRefund(request);
        return response;
    }
}
